package org.example.library.authentication;

import java.util.UUID;

import org.example.library.authentication.types.LoginResponse;

public class AuthUser{
	
	public LoginResponse isValidUser(String userID) {
		String details = "";
		String sessionID = "";
		// your user Authentication login is here
		boolean isValidUser = Math.random() > 0.5; //Dummy User Authentication login
		if(isValidUser)
		{
			details = "User " + userID + " is a vaild user";
			sessionID = UUID.randomUUID().toString();
		}else{
			details = "User " + userID + " is not a vaild user";
		}		
		return new LoginResponse(details, userID, sessionID, isValidUser);	
	}

}